package com.aspose.cells;

class zari {
   private Workbook a = null;
   private com.aspose.cells.a.f.zi b = null;
   private zapy c = null;

   zari(Workbook var1) {
      this.a = var1;
      this.c = new zapy(var1);
      var1.getWorksheets().clear();
   }

   void a(com.aspose.cells.b.a.d.zm var1) throws Exception {
      this.a(com.aspose.cells.a.f.zi.a(var1));
   }

   void a(com.aspose.cells.a.f.zi var1) throws Exception {
      this.b = var1;
      this.c.k = var1;

      try {
         zaqi var2 = new zaqi(var1, this.a);
         var2.a();
         this.c();
         this.a(false);
         this.b();
         this.a(true);
         this.a();
      } finally {
         this.b.b();
      }

   }

   private void a() throws Exception {
      zaqn var1 = new zaqn(this.c);
      if (this.b.a("meta.xml", true) != -1) {
         zcfw var2 = zasr.a(this.b, "meta.xml", false);
         if (var2.n()) {
            var2.a();
         } else {
            var1.a(var2);
         }
      }
   }

   private void a(boolean var1) throws Exception {
      zarm var2 = new zarm(this.a, this.c, var1);
      var2.a(this.b);
   }

   private void b() throws Exception {
      zaqw var1 = new zaqw(this.c);
      var1.a(this.b);
   }

   private void c() throws Exception {
      zarg var1 = new zarg(this.c);
      var1.a(this.b);
   }
}
